<?php

namespace addons\shopro\controller;

use addons\shopro\exception\Exception;
use addons\shopro\model\Order;
use addons\shopro\model\Store as ModelStore;
use addons\shopro\model\User;
use addons\shopro\model\UserStore;
use app\api\model\SendgoodsServiceModel;
use app\common\logic\UserLevelLogic;

class Test extends Base
{

    protected $noNeedLogin = ['index'];
    protected $noNeedRight = ['*'];


    public function index()
    {
        $out_trade_no = '202210562191909698001600';
        $order = Order::where('order_sn', $out_trade_no)->find();

        //记录分佣
        UserLevelLogic::divisionOrderMoney($order);

        // 订单完成后，发放服务礼遇
        SendgoodsServiceModel::send($order);
    }

}
